import numpy as np
from numpy import ma
import matplotlib.pyplot as plt

x = [1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009]
y = [0.32,0.32,0.32,0.32,0.33,0.33,0.34,0.37,0.37,0.37,0.37,0.39,0.41,0.42,0.44]
plt.step(x, y, label='pre')
for a,b in zip(x,y):
    plt.text(a,b,'%2.2f'%b, ha='right', va='bottom', fontsize =10, color ='y')
plt.plot(x,y,'b.')
plt.title('美国邮费阶梯图',family ='kaiti',size=20, color ='g',loc='center')  
plt.savefig("d:\\py\\美国邮费阶梯图")                                                                                                                                                                                        
plt.show()                                                                                                                                                                                                                                                

